<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>渐变加载动画</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            /* 元素居中 */
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #000;
        }
        .loader::before{
            content: "";
            position: absolute;
            top: 5px;
            left: 5px;
            right: 5px;
            bottom: 5px;
            background: #000;
            border-radius: 50%;
            z-index:1;
        }
        .loader{
            position: relative;
            top: 0;
            left: 0;
            width: 200px;
            height: 200px;
            /* 背景渐变 */
            background: linear-gradient(45deg, transparent, transparent 40%, #e5f403);
            border-radius: 50%;
            z-index: -1;
            animation: animate 2s linear infinite;
        }
        .loader::after{
            content: "";
            position: absolute;
            top: 0px;
            left: 0px;
            right: 0px;
            bottom: 0px;
            /* 背景渐变 */
            background: linear-gradient(45deg, transparent, transparent 40%, #e5f403);
            border-radius: 50%;
            z-index: -1;
            filter: blur(30px);
        }

        @keyframes animate{
            0%{
                transform: rotate(0deg);
                filter: hue-rotate(0deg);
            }
            100%{
                transform: rotate(360deg);
                filter: hue-rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <div class="loader">

    </div>
</body>
</html>